package com.yanmaohu.yulia.bean;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class TableReferenceList {

    private int beginIndex;
    private int endIndex;
    private List<TableReference> tableReferenceList;

    public TableReferenceList(List<TableReference> tableReferenceList) {
        this.beginIndex = tableReferenceList.get(0).getBeginIndex();
        this.endIndex = tableReferenceList.get(tableReferenceList.size() - 1).getEndIndex();
        this.tableReferenceList = tableReferenceList;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public int size() {
        return tableReferenceList.size();
    }

    public TableReference get(int index) {
        return tableReferenceList.get(index);
    }

}
